﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sispe.Entities;
using Sispe.Repository;
using Microsoft.Practices.Unity;

namespace Sispe.BussinesLogic
{
    public class UserProfileBL : IUserProfileBL
    {
        [Dependency]
        public IUserProfileRepository userProfileRepository { get; set; }

        public List<UserProfile> GetAllFromUserProfile()
        {
            return userProfileRepository.GetAllFromUserProfile();
        }

        public List<UserProfile> GetAllFromUserProfileByNombre(string userName)
        {
            return userProfileRepository.GetAllFromUserProfileByNombre(userName);
        }

        public UserProfile GetFromUserProfileById(int id)
        {
            return userProfileRepository.GetFromUserProfileById(id);
        }

        public void RemoveUserProfile(int id)
        {
            userProfileRepository.RemoveUserProfile(id);
        }


        public UserProfile GetOneUserProfileByUserName(string userName)
        {
            return userProfileRepository.GetOneUserProfileByUserName(userName);
        }
    }
}
